<?php

namespace App\Http\Controllers\Api;

use App\Goods;
use App\Http\Resources\GoodsResource;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class GoodsController extends Controller
{
    public function index()
    {
        return response()->json(['productList' => GoodsResource::collection(Goods::orderBy('id')->get())]);
    }
}
